<div class="area-type-lists" id="industry_list">
  <php>$j = 0; $menuCount = count($menu); $showNums = 8;</php>
  <volist name="menu" id="vo">
  <php>$j++;</php>
  <div id="list_div_{$j}" class="area-type-list <eq name='j' value='$menuCount'>no-margin</eq>">
    <p>查找{$vo.title}</p>
    <ul class="clearfixul">
      <li>
        <a <eq name="cid" value="$vo.id"> class="current"</eq> href="{:U('w3g/People/findResult', array('cid'=>$vo['id'],'sex'=>$sex,'area'=>$area,'verify'=>$verify,'type'=>$type))}">全部</a>
      </li>
      <volist name="vo.child" id="v">
      <li <gt name="i" value="$showNums">style="display:none;"</gt>>
        <a <eq name="cid" value="$v.id"> class="current"</eq> href="{:U('w3g/People/findResult', array('cid'=>$v['id'],'sex'=>$sex,'area'=>$area,'verify'=>$verify,'type'=>$type))}">{$v.title|getShort=###, 10}</a>
      </li>
      </volist>
    </ul>
    <php>if(count($vo['child']) > $showNums):</php>
    <div id="slide_btn_{$j}" style="margin-bottom:2px;"><a style="margin-left:128px;" href="javascript:;" onclick="slideDiv({$j}, {$showNums}, true);">展开</a></div>
    <php>endif;</php>
  </div>
  </volist>
</div>

<script type="text/javascript">
/**
 * 伸缩菜单效果
 * @param integer divId 操作DIV对象
 * @param integer nums 显示LI个数
 * @param boolean slide 是否展开，展开true，缩起false
 * @return boolean false
 */
var slideDiv = function(divId, nums, slide)
{
  $div = $('#list_div_'+divId);
  $slide = $('#slide_btn_'+divId);
  $div.find('li').each(function(i, n) {
    if(i > nums) {
      if(slide) {
        $(this).show()
        $slide.html('<a style="margin-left:128px;" href="javascript:;" onclick="slideDiv('+divId+', '+nums+', false);">收起</a>');
      } else {
        $(this).hide();
        $slide.html('<a style="margin-left:128px;" href="javascript:;" onclick="slideDiv('+divId+', '+nums+', true);">展开</a>');
      }
    }
  });
  return false;
}
</script>